<?php
/**
* @version		$Id:default.php 1 2014-07-20 09:49:36Z Hoang Yen $
* @copyright	Copyright (C) 2014, Hoang Yen. All rights reserved.
* @license 		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>"><h2><?php echo $this->params->get('page_title');  ?></h2></div>
<h3><?php echo $this->item->alias; ?></h3>
<div class="contentpane">
	<div><h4>Some interesting informations</h4></div>
	<div>
		Id: <?php echo $this->item->id; ?> | Alias: <?php echo $this->item->alias; ?>
	</div>
		
	<div>
		Description: <?php echo $this->item->description; ?> | Published: <?php echo $this->item->published; ?>
	</div>
		
	<div>
		Created: <?php echo $this->item->created; ?> | Created_by: <?php echo $this->item->created_by; ?>
	</div>
	
	<div>
		Ordering: <?php echo $this->item->ordering; ?> | Customer_name: <?php echo $this->item->customer_name; ?>
	</div>
	
	<div>
		Customer_phone: <?php echo $this->item->customer_phone; ?> | Customer_numbers: <?php echo $this->item->customer_numbers; ?>
	</div>
	
	<div>
		Order_date: <?php echo $this->item->order_date; ?>
	</div>
	
<h2><?php echo JText::_('COM_RESTAURANTMANAGE_ORDER_DISH'); ?></h2>
<div class="contentpane">
	<table>
		<thead>
			<tr>
			  <th width="5">
					<?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_ID'); ?>
				</th>
				<th>
					<?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_ALIAS'); ?>
				</th>
				<th>
					<?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_NAME'); ?>
				</th>
				<th>
					<?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_DESCRIPTION'); ?>
				</th>
			</tr>
		</thead>
		<tfoot></tfoot>
		<tbody>
			<?php foreach($this->items as $i => $item):;
			?>
			  	<tr class="row<?php echo $i % 2; ?>">
					<td>
						<?php echo $item->id; ?>
					</td>
					<td>
						<?php echo $item->alias; ?>
					</td>
					 <td>
					 	<?php echo $item->name ?>
					 </td>
					 <td>
					 	<?php echo $item->description ?>
					 </td>

				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
</div>
<h2><?php echo JText::_('COM_RESTAURANTMANAGE_ORDER_TPFORM'); ?></h2>
<div class="contentpane">
	<form action="<?php echo JRoute::_('index.php')?>" enctype="multipart/form-data" method="post">
	  	<ul>
	  		<li>
	  			<span style="float: left; width: 100px;"><?php echo $this->form->getLabel('dish_id'); ?></span> 
	  			: <?php echo $this->form->getInput('dish_id'); ?>
	  			<?php echo $this->form->getInput('dish_numbers'); ?>
	  			<?php echo $this->form->getInput('dish_unit'); ?>
	  		</li>
	  		<li>
	  			<span style="float: left; width: 100px;"><?php echo $this->form->getLabel('description'); ?></span> 
	  			: <?php echo $this->form->getInput('description'); ?>
	  		</li>
	  		<li>
		        <button type="submit" style="width: 100px;">
		            <?php echo JText::_('JSAVE') ?>
		        </button>
	  		</li>
	  	</ul>
	  	<input type="hidden" name="order_id" value="<?php echo $this->item->id ?>" />
	  	<!-- PATH -->
	  	<input type="hidden" name="option" value="com_restaurantManage" />
	    <input type="hidden" name="task" value="zorder.addDish" />
		<input type="hidden" name="view" value="zorder" />
		<?php echo JHTML::_( 'form.token' ); ?>
	</form>
</div>
 